#! /usr/bin/env python
#coding=utf-8
s = input();
if '1' * 7 in s or '0' * 7 in s:
    print("YES");
else:
    print("NO");